home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 June: Reference Library / Dev.CD Jun 99 RL Disk 1.toast / What's New / Development Kits / ColorSync 2.6 Mac SDK / Interfaces / CMScriptingPlugin.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-04-12  |  21.2 KB  |  407 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMScriptingPlugin.h
  3.  
  4.      Contains:    ColorSync Scripting Plugin API
  5.  
  6.      Version:    Technology:    ColorSync 2.5
  7.                  Release:    ColorSync 2.6 SDK for use with Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CMSCRIPTINGPLUGIN__
  18. #define __CMSCRIPTINGPLUGIN__
  19.  
  20. #ifndef __FILES__
  21. #include <Files.h>
  22. #endif
  23. #ifndef __CMAPPLICATION__
  24. #include <CMApplication.h>
  25. #endif
  26. #ifndef __CODEFRAGMENTS__
  27. #include <CodeFragments.h>
  28. #endif
  29.  
  30.  
  31.  
  32.  
  33.  
  34. #if PRAGMA_ONCE
  35. #pragma once
  36. #endif
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. #if PRAGMA_IMPORT
  43. #pragma import on
  44. #endif
  45.  
  46. #if PRAGMA_STRUCT_ALIGN
  47.     #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49.     #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51.     #pragma pack(2)
  52. #endif
  53.  
  54.  
  55. enum {
  56.                                                                 /* ColorSync Scripting AppleEvent Errors */
  57.     cmspInvalidImageFile        = -4220,                        /* Plugin cannot handle this image file type */
  58.     cmspInvalidImageSpace        = -4221,                        /* Plugin cannot create an image file of this colorspace */
  59.     cmspInvalidProfileEmbed        = -4222,                        /* Specific invalid profile errors */
  60.     cmspInvalidProfileSource    = -4223,
  61.     cmspInvalidProfileDest        = -4224,
  62.     cmspInvalidProfileProof        = -4225,
  63.     cmspInvalidProfileLink        = -4226
  64. };
  65.  
  66.  
  67. /**** embedFlags field  ****/
  68. /* reserved for future use: currently 0 */
  69.  
  70. /**** matchFlags field  ****/
  71.  
  72. enum {
  73.     cmspFavorEmbeddedMask        = 0x00000001                    /* if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present*/
  74. };
  75.  
  76.  
  77. /**** scripting plugin entry points  ****/
  78. typedef CALLBACK_API_C( CMError , ValidateImageProcPtr )(const FSSpec *spec);
  79. typedef CALLBACK_API_C( CMError , GetImageSpaceProcPtr )(const FSSpec *spec, OSType *space);
  80. typedef CALLBACK_API_C( CMError , ValidateSpaceProcPtr )(const FSSpec *spec, OSType *space);
  81. typedef CALLBACK_API_C( CMError , EmbedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, CMProfileRef embedProf, UInt32 embedFlags);
  82. typedef CALLBACK_API_C( CMError , UnembedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto);
  83. typedef CALLBACK_API_C( CMError , MatchImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 qual, UInt32 srcIntent, CMProfileRef srcProf, CMProfileRef dstProf, CMProfileRef prfProf, UInt32 matchFlags);
  84. typedef CALLBACK_API_C( CMError , CountImageProfilesProcPtr )(const FSSpec *spec, UInt32 *count);
  85. typedef CALLBACK_API_C( CMError , GetIndImageProfileProcPtr )(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
  86. typedef CALLBACK_API_C( CMError , SetIndImageProfileProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 index, CMProfileRef prof, UInt32 embedFlags);
  87. /**** CSScriptingLib entry points  ****/
  88. typedef CALLBACK_API_C( CMError , CMValidImageProcPtr )(const FSSpec *spec);
  89. typedef CALLBACK_API_C( CMError , CMGetImageSpaceProcPtr )(const FSSpec *spec, OSType *space);
  90. typedef CALLBACK_API_C( CMError , CMEmbedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, CMProfileRef embProf);
  91. typedef CALLBACK_API_C( CMError , CMUnembedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl);
  92. typedef CALLBACK_API_C( CMError , CMMatchImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef srcProf, UInt32 srcIntent, CMProfileRef dstProf);
  93. typedef CALLBACK_API_C( CMError , CMProofImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef srcProf, UInt32 srcIntent, CMProfileRef dstProf, CMProfileRef prfProf);
  94. typedef CALLBACK_API_C( CMError , CMLinkImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef lnkProf, UInt32 lnkIntent);
  95. typedef CALLBACK_API_C( CMError , CMCountImageProfilesProcPtr )(const FSSpec *spec, UInt32 *count);
  96. typedef CALLBACK_API_C( CMError , CMGetIndImageProfileProcPtr )(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
  97. typedef CALLBACK_API_C( CMError , CMSetIndImageProfileProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 index, CMProfileRef prof);
  98. typedef STACK_UPP_TYPE(ValidateImageProcPtr)                     ValidateImageUPP;
  99. typedef STACK_UPP_TYPE(GetImageSpaceProcPtr)                     GetImageSpaceUPP;
  100. typedef STACK_UPP_TYPE(ValidateSpaceProcPtr)                     ValidateSpaceUPP;
  101. typedef STACK_UPP_TYPE(EmbedImageProcPtr)                         EmbedImageUPP;
  102. typedef STACK_UPP_TYPE(UnembedImageProcPtr)                     UnembedImageUPP;
  103. typedef STACK_UPP_TYPE(MatchImageProcPtr)                         MatchImageUPP;
  104. typedef STACK_UPP_TYPE(CountImageProfilesProcPtr)                 CountImageProfilesUPP;
  105. typedef STACK_UPP_TYPE(GetIndImageProfileProcPtr)                 GetIndImageProfileUPP;
  106. typedef STACK_UPP_TYPE(SetIndImageProfileProcPtr)                 SetIndImageProfileUPP;
  107. typedef STACK_UPP_TYPE(CMValidImageProcPtr)                     CMValidImageUPP;
  108. typedef STACK_UPP_TYPE(CMGetImageSpaceProcPtr)                     CMGetImageSpaceUPP;
  109. typedef STACK_UPP_TYPE(CMEmbedImageProcPtr)                     CMEmbedImageUPP;
  110. typedef STACK_UPP_TYPE(CMUnembedImageProcPtr)                     CMUnembedImageUPP;
  111. typedef STACK_UPP_TYPE(CMMatchImageProcPtr)                     CMMatchImageUPP;
  112. typedef STACK_UPP_TYPE(CMProofImageProcPtr)                     CMProofImageUPP;
  113. typedef STACK_UPP_TYPE(CMLinkImageProcPtr)                         CMLinkImageUPP;
  114. typedef STACK_UPP_TYPE(CMCountImageProfilesProcPtr)             CMCountImageProfilesUPP;
  115. typedef STACK_UPP_TYPE(CMGetIndImageProfileProcPtr)             CMGetIndImageProfileUPP;
  116. typedef STACK_UPP_TYPE(CMSetIndImageProfileProcPtr)             CMSetIndImageProfileUPP;
  117. enum { uppValidateImageProcInfo = 0x000000F1 };                 /* 4_bytes Func(4_bytes) */
  118. enum { uppGetImageSpaceProcInfo = 0x000003F1 };                 /* 4_bytes Func(4_bytes, 4_bytes) */
  119. enum { uppValidateSpaceProcInfo = 0x000003F1 };                 /* 4_bytes Func(4_bytes, 4_bytes) */
  120. enum { uppEmbedImageProcInfo = 0x00003FF1 };                     /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  121. enum { uppUnembedImageProcInfo = 0x000003F1 };                     /* 4_bytes Func(4_bytes, 4_bytes) */
  122. enum { uppMatchImageProcInfo = 0x003FFFF1 };                     /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  123. enum { uppCountImageProfilesProcInfo = 0x000003F1 };             /* 4_bytes Func(4_bytes, 4_bytes) */
  124. enum { uppGetIndImageProfileProcInfo = 0x00000FF1 };             /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  125. enum { uppSetIndImageProfileProcInfo = 0x0000FFF1 };             /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  126. enum { uppCMValidImageProcInfo = 0x000000F1 };                     /* 4_bytes Func(4_bytes) */
  127. enum { uppCMGetImageSpaceProcInfo = 0x000003F1 };                 /* 4_bytes Func(4_bytes, 4_bytes) */
  128. enum { uppCMEmbedImageProcInfo = 0x000037F1 };                     /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
  129. enum { uppCMUnembedImageProcInfo = 0x000007F1 };                 /* 4_bytes Func(4_bytes, 4_bytes, 1_byte) */
  130. enum { uppCMMatchImageProcInfo = 0x000FF7F1 };                     /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  131. enum { uppCMProofImageProcInfo = 0x003FF7F1 };                     /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  132. enum { uppCMLinkImageProcInfo = 0x0003F7F1 };                     /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes, 4_bytes, 4_bytes) */
  133. enum { uppCMCountImageProfilesProcInfo = 0x000003F1 };             /* 4_bytes Func(4_bytes, 4_bytes) */
  134. enum { uppCMGetIndImageProfileProcInfo = 0x00000FF1 };             /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  135. enum { uppCMSetIndImageProfileProcInfo = 0x0000F7F1 };             /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes, 4_bytes) */
  136. #if MIXEDMODE_CALLS_ARE_FUNCTIONS
  137. EXTERN_API(ValidateImageUPP)
  138. NewValidateImageProc           (ValidateImageProcPtr    userRoutine);
  139. EXTERN_API(GetImageSpaceUPP)
  140. NewGetImageSpaceProc           (GetImageSpaceProcPtr    userRoutine);
  141. EXTERN_API(ValidateSpaceUPP)
  142. NewValidateSpaceProc           (ValidateSpaceProcPtr    userRoutine);
  143. EXTERN_API(EmbedImageUPP)
  144. NewEmbedImageProc               (EmbedImageProcPtr        userRoutine);
  145. EXTERN_API(UnembedImageUPP)
  146. NewUnembedImageProc               (UnembedImageProcPtr        userRoutine);
  147. EXTERN_API(MatchImageUPP)
  148. NewMatchImageProc               (MatchImageProcPtr        userRoutine);
  149. EXTERN_API(CountImageProfilesUPP)
  150. NewCountImageProfilesProc       (CountImageProfilesProcPtr userRoutine);
  151. EXTERN_API(GetIndImageProfileUPP)
  152. NewGetIndImageProfileProc       (GetIndImageProfileProcPtr userRoutine);
  153. EXTERN_API(SetIndImageProfileUPP)
  154. NewSetIndImageProfileProc       (SetIndImageProfileProcPtr userRoutine);
  155. EXTERN_API(CMValidImageUPP)
  156. NewCMValidImageProc               (CMValidImageProcPtr        userRoutine);
  157. EXTERN_API(CMGetImageSpaceUPP)
  158. NewCMGetImageSpaceProc           (CMGetImageSpaceProcPtr    userRoutine);
  159. EXTERN_API(CMEmbedImageUPP)
  160. NewCMEmbedImageProc               (CMEmbedImageProcPtr        userRoutine);
  161. EXTERN_API(CMUnembedImageUPP)
  162. NewCMUnembedImageProc           (CMUnembedImageProcPtr    userRoutine);
  163. EXTERN_API(CMMatchImageUPP)
  164. NewCMMatchImageProc               (CMMatchImageProcPtr        userRoutine);
  165. EXTERN_API(CMProofImageUPP)
  166. NewCMProofImageProc               (CMProofImageProcPtr        userRoutine);
  167. EXTERN_API(CMLinkImageUPP)
  168. NewCMLinkImageProc               (CMLinkImageProcPtr        userRoutine);
  169. EXTERN_API(CMCountImageProfilesUPP)
  170. NewCMCountImageProfilesProc       (CMCountImageProfilesProcPtr userRoutine);
  171. EXTERN_API(CMGetIndImageProfileUPP)
  172. NewCMGetIndImageProfileProc       (CMGetIndImageProfileProcPtr userRoutine);
  173. EXTERN_API(CMSetIndImageProfileUPP)
  174. NewCMSetIndImageProfileProc       (CMSetIndImageProfileProcPtr userRoutine);
  175. EXTERN_API(CMError)
  176. CallValidateImageProc           (ValidateImageUPP        userRoutine,
  177.                                 const FSSpec *            spec);
  178. EXTERN_API(CMError)
  179. CallGetImageSpaceProc           (GetImageSpaceUPP        userRoutine,
  180.                                 const FSSpec *            spec,
  181.                                 OSType *                space);
  182. EXTERN_API(CMError)
  183. CallValidateSpaceProc           (ValidateSpaceUPP        userRoutine,
  184.                                 const FSSpec *            spec,
  185.                                 OSType *                space);
  186. EXTERN_API(CMError)
  187. CallEmbedImageProc               (EmbedImageUPP            userRoutine,
  188.                                 const FSSpec *            specFrom,
  189.                                 const FSSpec *            specInto,
  190.                                 CMProfileRef            embedProf,
  191.                                 UInt32                    embedFlags);
  192. EXTERN_API(CMError)
  193. CallUnembedImageProc           (UnembedImageUPP            userRoutine,
  194.                                 const FSSpec *            specFrom,
  195.                                 const FSSpec *            specInto);
  196. EXTERN_API(CMError)
  197. CallMatchImageProc               (MatchImageUPP            userRoutine,
  198.                                 const FSSpec *            specFrom,
  199.                                 const FSSpec *            specInto,
  200.                                 UInt32                    qual,
  201.                                 UInt32                    srcIntent,
  202.                                 CMProfileRef            srcProf,
  203.                                 CMProfileRef            dstProf,
  204.                                 CMProfileRef            prfProf,
  205.                                 UInt32                    matchFlags);
  206. EXTERN_API(CMError)
  207. CallCountImageProfilesProc       (CountImageProfilesUPP    userRoutine,
  208.                                 const FSSpec *            spec,
  209.                                 UInt32 *                count);
  210. EXTERN_API(CMError)
  211. CallGetIndImageProfileProc       (GetIndImageProfileUPP    userRoutine,
  212.                                 const FSSpec *            spec,
  213.                                 UInt32                    index,
  214.                                 CMProfileRef *            prof);
  215. EXTERN_API(CMError)
  216. CallSetIndImageProfileProc       (SetIndImageProfileUPP    userRoutine,
  217.                                 const FSSpec *            specFrom,
  218.                                 const FSSpec *            specInto,
  219.                                 UInt32                    index,
  220.                                 CMProfileRef            prof,
  221.                                 UInt32                    embedFlags);
  222. EXTERN_API(CMError)
  223. CallCMValidImageProc           (CMValidImageUPP            userRoutine,
  224.                                 const FSSpec *            spec);
  225. EXTERN_API(CMError)
  226. CallCMGetImageSpaceProc           (CMGetImageSpaceUPP        userRoutine,
  227.                                 const FSSpec *            spec,
  228.                                 OSType *                space);
  229. EXTERN_API(CMError)
  230. CallCMEmbedImageProc           (CMEmbedImageUPP            userRoutine,
  231.                                 const FSSpec *            specFrom,
  232.                                 const FSSpec *            specInto,
  233.                                 Boolean                    repl,
  234.                                 CMProfileRef            embProf);
  235. EXTERN_API(CMError)
  236. CallCMUnembedImageProc           (CMUnembedImageUPP        userRoutine,
  237.                                 const FSSpec *            specFrom,
  238.                                 const FSSpec *            specInto,
  239.                                 Boolean                    repl);
  240. EXTERN_API(CMError)
  241. CallCMMatchImageProc           (CMMatchImageUPP            userRoutine,
  242.                                 const FSSpec *            specFrom,
  243.                                 const FSSpec *            specInto,
  244.                                 Boolean                    repl,
  245.                                 UInt32                    qual,
  246.                                 CMProfileRef            srcProf,
  247.                                 UInt32                    srcIntent,
  248.                                 CMProfileRef            dstProf);
  249. EXTERN_API(CMError)
  250. CallCMProofImageProc           (CMProofImageUPP            userRoutine,
  251.                                 const FSSpec *            specFrom,
  252.                                 const FSSpec *            specInto,
  253.                                 Boolean                    repl,
  254.                                 UInt32                    qual,
  255.                                 CMProfileRef            srcProf,
  256.                                 UInt32                    srcIntent,
  257.                                 CMProfileRef            dstProf,
  258.                                 CMProfileRef            prfProf);
  259. EXTERN_API(CMError)
  260. CallCMLinkImageProc               (CMLinkImageUPP            userRoutine,
  261.                                 const FSSpec *            specFrom,
  262.                                 const FSSpec *            specInto,
  263.                                 Boolean                    repl,
  264.                                 UInt32                    qual,
  265.                                 CMProfileRef            lnkProf,
  266.                                 UInt32                    lnkIntent);
  267. EXTERN_API(CMError)
  268. CallCMCountImageProfilesProc    (CMCountImageProfilesUPP userRoutine,
  269.                                 const FSSpec *            spec,
  270.                                 UInt32 *                count);
  271. EXTERN_API(CMError)
  272. CallCMGetIndImageProfileProc    (CMGetIndImageProfileUPP userRoutine,
  273.                                 const FSSpec *            spec,
  274.                                 UInt32                    index,
  275.                                 CMProfileRef *            prof);
  276. EXTERN_API(CMError)
  277. CallCMSetIndImageProfileProc    (CMSetIndImageProfileUPP userRoutine,
  278.                                 const FSSpec *            specFrom,
  279.                                 const FSSpec *            specInto,
  280.                                 Boolean                    repl,
  281.                                 UInt32                    index,
  282.                                 CMProfileRef            prof);
  283. #else
  284. #define NewValidateImageProc(userRoutine)                         (ValidateImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppValidateImageProcInfo, GetCurrentArchitecture())
  285. #define NewGetImageSpaceProc(userRoutine)                         (GetImageSpaceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetImageSpaceProcInfo, GetCurrentArchitecture())
  286. #define NewValidateSpaceProc(userRoutine)                         (ValidateSpaceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppValidateSpaceProcInfo, GetCurrentArchitecture())
  287. #define NewEmbedImageProc(userRoutine)                             (EmbedImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEmbedImageProcInfo, GetCurrentArchitecture())
  288. #define NewUnembedImageProc(userRoutine)                         (UnembedImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUnembedImageProcInfo, GetCurrentArchitecture())
  289. #define NewMatchImageProc(userRoutine)                             (MatchImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMatchImageProcInfo, GetCurrentArchitecture())
  290. #define NewCountImageProfilesProc(userRoutine)                     (CountImageProfilesUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCountImageProfilesProcInfo, GetCurrentArchitecture())
  291. #define NewGetIndImageProfileProc(userRoutine)                     (GetIndImageProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetIndImageProfileProcInfo, GetCurrentArchitecture())
  292. #define NewSetIndImageProfileProc(userRoutine)                     (SetIndImageProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSetIndImageProfileProcInfo, GetCurrentArchitecture())
  293. #define NewCMValidImageProc(userRoutine)                         (CMValidImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMValidImageProcInfo, GetCurrentArchitecture())
  294. #define NewCMGetImageSpaceProc(userRoutine)                     (CMGetImageSpaceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMGetImageSpaceProcInfo, GetCurrentArchitecture())
  295. #define NewCMEmbedImageProc(userRoutine)                         (CMEmbedImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMEmbedImageProcInfo, GetCurrentArchitecture())
  296. #define NewCMUnembedImageProc(userRoutine)                         (CMUnembedImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMUnembedImageProcInfo, GetCurrentArchitecture())
  297. #define NewCMMatchImageProc(userRoutine)                         (CMMatchImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMMatchImageProcInfo, GetCurrentArchitecture())
  298. #define NewCMProofImageProc(userRoutine)                         (CMProofImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMProofImageProcInfo, GetCurrentArchitecture())
  299. #define NewCMLinkImageProc(userRoutine)                         (CMLinkImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMLinkImageProcInfo, GetCurrentArchitecture())
  300. #define NewCMCountImageProfilesProc(userRoutine)                 (CMCountImageProfilesUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMCountImageProfilesProcInfo, GetCurrentArchitecture())
  301. #define NewCMGetIndImageProfileProc(userRoutine)                 (CMGetIndImageProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMGetIndImageProfileProcInfo, GetCurrentArchitecture())
  302. #define NewCMSetIndImageProfileProc(userRoutine)                 (CMSetIndImageProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMSetIndImageProfileProcInfo, GetCurrentArchitecture())
  303. #define CallValidateImageProc(userRoutine, spec)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppValidateImageProcInfo, (spec))
  304. #define CallGetImageSpaceProc(userRoutine, spec, space)         CALL_TWO_PARAMETER_UPP((userRoutine), uppGetImageSpaceProcInfo, (spec), (space))
  305. #define CallValidateSpaceProc(userRoutine, spec, space)         CALL_TWO_PARAMETER_UPP((userRoutine), uppValidateSpaceProcInfo, (spec), (space))
  306. #define CallEmbedImageProc(userRoutine, specFrom, specInto, embedProf, embedFlags)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppEmbedImageProcInfo, (specFrom), (specInto), (embedProf), (embedFlags))
  307. #define CallUnembedImageProc(userRoutine, specFrom, specInto)     CALL_TWO_PARAMETER_UPP((userRoutine), uppUnembedImageProcInfo, (specFrom), (specInto))
  308. #define CallMatchImageProc(userRoutine, specFrom, specInto, qual, srcIntent, srcProf, dstProf, prfProf, matchFlags)  CALL_EIGHT_PARAMETER_UPP((userRoutine), uppMatchImageProcInfo, (specFrom), (specInto), (qual), (srcIntent), (srcProf), (dstProf), (prfProf), (matchFlags))
  309. #define CallCountImageProfilesProc(userRoutine, spec, count)     CALL_TWO_PARAMETER_UPP((userRoutine), uppCountImageProfilesProcInfo, (spec), (count))
  310. #define CallGetIndImageProfileProc(userRoutine, spec, index, prof)  CALL_THREE_PARAMETER_UPP((userRoutine), uppGetIndImageProfileProcInfo, (spec), (index), (prof))
  311. #define CallSetIndImageProfileProc(userRoutine, specFrom, specInto, index, prof, embedFlags)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppSetIndImageProfileProcInfo, (specFrom), (specInto), (index), (prof), (embedFlags))
  312. #define CallCMValidImageProc(userRoutine, spec)                 CALL_ONE_PARAMETER_UPP((userRoutine), uppCMValidImageProcInfo, (spec))
  313. #define CallCMGetImageSpaceProc(userRoutine, spec, space)         CALL_TWO_PARAMETER_UPP((userRoutine), uppCMGetImageSpaceProcInfo, (spec), (space))
  314. #define CallCMEmbedImageProc(userRoutine, specFrom, specInto, repl, embProf)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppCMEmbedImageProcInfo, (specFrom), (specInto), (repl), (embProf))
  315. #define CallCMUnembedImageProc(userRoutine, specFrom, specInto, repl)  CALL_THREE_PARAMETER_UPP((userRoutine), uppCMUnembedImageProcInfo, (specFrom), (specInto), (repl))
  316. #define CallCMMatchImageProc(userRoutine, specFrom, specInto, repl, qual, srcProf, srcIntent, dstProf)  CALL_SEVEN_PARAMETER_UPP((userRoutine), uppCMMatchImageProcInfo, (specFrom), (specInto), (repl), (qual), (srcProf), (srcIntent), (dstProf))
  317. #define CallCMProofImageProc(userRoutine, specFrom, specInto, repl, qual, srcProf, srcIntent, dstProf, prfProf)  CALL_EIGHT_PARAMETER_UPP((userRoutine), uppCMProofImageProcInfo, (specFrom), (specInto), (repl), (qual), (srcProf), (srcIntent), (dstProf), (prfProf))
  318. #define CallCMLinkImageProc(userRoutine, specFrom, specInto, repl, qual, lnkProf, lnkIntent)  CALL_SIX_PARAMETER_UPP((userRoutine), uppCMLinkImageProcInfo, (specFrom), (specInto), (repl), (qual), (lnkProf), (lnkIntent))
  319. #define CallCMCountImageProfilesProc(userRoutine, spec, count)     CALL_TWO_PARAMETER_UPP((userRoutine), uppCMCountImageProfilesProcInfo, (spec), (count))
  320. #define CallCMGetIndImageProfileProc(userRoutine, spec, index, prof)  CALL_THREE_PARAMETER_UPP((userRoutine), uppCMGetIndImageProfileProcInfo, (spec), (index), (prof))
  321. #define CallCMSetIndImageProfileProc(userRoutine, specFrom, specInto, repl, index, prof)  CALL_FIVE_PARAMETER_UPP((userRoutine), uppCMSetIndImageProfileProcInfo, (specFrom), (specInto), (repl), (index), (prof))
  322. #endif
  323. /**** CSScriptingLib API  ****/
  324.  
  325. EXTERN_API_C( CMError )
  326. CMValidImage                    (const FSSpec *            spec);
  327.  
  328. EXTERN_API_C( CMError )
  329. CMGetImageSpace                    (const FSSpec *            spec,
  330.                                  OSType *                space);
  331.  
  332. EXTERN_API_C( CMError )
  333. CMEmbedImage                    (const FSSpec *            specFrom,
  334.                                  const FSSpec *            specInto,
  335.                                  Boolean                 repl,
  336.                                  CMProfileRef             embProf);
  337.  
  338. EXTERN_API_C( CMError )
  339. CMUnembedImage                    (const FSSpec *            specFrom,
  340.                                  const FSSpec *            specInto,
  341.                                  Boolean                 repl);
  342.  
  343. EXTERN_API_C( CMError )
  344. CMMatchImage                    (const FSSpec *            specFrom,
  345.                                  const FSSpec *            specInto,
  346.                                  Boolean                 repl,
  347.                                  UInt32                 qual,
  348.                                  CMProfileRef             srcProf,
  349.                                  UInt32                 srcIntent,
  350.                                  CMProfileRef             dstProf);
  351.  
  352. EXTERN_API_C( CMError )
  353. CMProofImage                    (const FSSpec *            specFrom,
  354.                                  const FSSpec *            specInto,
  355.                                  Boolean                 repl,
  356.                                  UInt32                 qual,
  357.                                  CMProfileRef             srcProf,
  358.                                  UInt32                 srcIntent,
  359.                                  CMProfileRef             dstProf,
  360.                                  CMProfileRef             prfProf);
  361.  
  362. EXTERN_API_C( CMError )
  363. CMLinkImage                        (const FSSpec *            specFrom,
  364.                                  const FSSpec *            specInto,
  365.                                  Boolean                 repl,
  366.                                  UInt32                 qual,
  367.                                  CMProfileRef             lnkProf,
  368.                                  UInt32                 lnkIntent);
  369.  
  370. EXTERN_API_C( CMError )
  371. CMCountImageProfiles            (const FSSpec *            spec,
  372.                                  UInt32 *                count);
  373.  
  374. EXTERN_API_C( CMError )
  375. CMGetIndImageProfile            (const FSSpec *            spec,
  376.                                  UInt32                 index,
  377.                                  CMProfileRef *            prof);
  378.  
  379. EXTERN_API_C( CMError )
  380. CMSetIndImageProfile            (const FSSpec *            specFrom,
  381.                                  const FSSpec *            specInto,
  382.                                  Boolean                 repl,
  383.                                  UInt32                 index,
  384.                                  CMProfileRef             prof);
  385.  
  386.  
  387. #if PRAGMA_STRUCT_ALIGN
  388.     #pragma options align=reset
  389. #elif PRAGMA_STRUCT_PACKPUSH
  390.     #pragma pack(pop)
  391. #elif PRAGMA_STRUCT_PACK
  392.     #pragma pack()
  393. #endif
  394.  
  395. #ifdef PRAGMA_IMPORT_OFF
  396. #pragma import off
  397. #elif PRAGMA_IMPORT
  398. #pragma import reset
  399. #endif
  400.  
  401. #ifdef __cplusplus
  402. }
  403. #endif
  404.  
  405. #endif /* __CMSCRIPTINGPLUGIN__ */
  406.  
  407.